<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
        <div class="x_title">
            <h2>{$pri_name}</h2>
            <div class="clearfix"></div>
        </div>
        <div class="x_content">
            <form class="form-horizontal form-label-left" novalidate action="" id="commentForm" method="post" enctype="multipart/form-data">
                {notempty name="code"}<p><code>备注:</code>{$code}</a></p>{/notempty}
                <!--<span class="section">Personal Info</span>-->
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单号 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.order_number}</div>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.name}</div>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">登录手机号 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.member_mobile}</div>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.mobile}</div>
                    </div>
                </div>
<!--                <div class="item form-group">-->
<!--                    <label class="control-label col-md-3 col-sm-3 col-xs-12">工作单位 <span class="required" aria-required="true"></span>-->
<!--                    </label>-->
<!--                    <div class="col-md-6 col-sm-6 col-xs-12">-->
<!--                        <div class="text">{$info.unit_text}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="item form-group">-->
<!--                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单号 <span class="required" aria-required="true"></span>-->
<!--                    </label>-->
<!--                    <div class="col-md-6 col-sm-6 col-xs-12">-->
<!--                        <div class="text">{$info.order_number}</div>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">配送方式 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.distribution_type}</div>
                    </div>
                </div>
                {if $info.distribution_type_id == 1}
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">省市区 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.prov}-{$info.city}-{$info.area}</div>
                    </div>
                </div>

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">地址 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text" onclick="copyText('{$info.address}')">{$info.address}</div>
                    </div>
                </div>
                {/if}
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单价格 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.total_price} 元</div>
                    </div>
                </div>
                <!--等待发货-->

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="code"><a target="_blank" href="https://www.sf-express.com/chn/sc">快递编码</a>  <span class="required" aria-required="true">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select title="请选择快递" name="express_code" required="" class="single_select js-states form-control select2-hidden-accessible" id="code" style="width: 100%;" aria-required="true" tabindex="-1" aria-hidden="true">
                            <option value="">| -- 全部快递编码</option>
                            {volist name="$express" id="vo"}
                            <option value="{$vo.code}" {eq name="$vo.code" value="$info.express_code|default=''"}selected{/eq}>{$vo.title}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="item form-group" >
                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="express_number">运单号 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12 ">
                        <input title="请输入快递编码" type="text" id="express_number" name="express_number" value="{$info.express_number|default=''}" minlength="2" required class="form-control col-md-7 col-xs-12" placeholder="">
                    </div>
                </div>
                {eq name="$info.status" value="2"} {/eq}
<!--                {if $info.status >= 3 && $info.distribution_type_id == 1}-->
<!--                <div class="item form-group">-->
<!--                    <label class="control-label col-md-3 col-sm-3 col-xs-12">快递名称 <span class="required" aria-required="true"></span>-->
<!--                    </label>-->
<!--                    <div class="col-md-6 col-sm-6 col-xs-12">-->
<!--                        <div class="text">{$info.express_title}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="item form-group">-->
<!--                    <label class="control-label col-md-3 col-sm-3 col-xs-12">快递单号 <span class="required" aria-required="true"></span>-->
<!--                    </label>-->
<!--                    <div class="col-md-6 col-sm-6 col-xs-12">-->
<!--                        <div class="text">{$info.express_number}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--                {/if}-->
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单状态 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.status_text}</div>
                    </div>
                </div>
                {eq name="$info.status" value="8"}
                {:html_text('退货金额','tui_price',$info)}
                {/eq}
                {eq name="$info.status" value="11"}
                {:html_text('退货金额','tui_price',$info)}
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">退货单号 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.tui_ydh}</div>
                    </div>
                </div>
                {/eq}
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">创建时间 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.create_time}</div>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单备注 <span class="required" aria-required="true"></span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <div class="text">{$info.remark}</div>
                    </div>
                </div>
                {volist name="$info.package" id="vo2"}
<!--                <div class="form-group">-->
<!--                    <label class="control-label col-md-3 "></label>-->
<!--                    <div class="col-md-6">-->
<!--                    <td>{$vo2.package_title}</td>-->
<!--                    <td>{$vo2.package_type}</td>-->
<!--                    <td>{$vo2.package_total_price} 元</td>-->
<!--                    </div>-->
<!--                </div>-->

                <div class="form-group style">
                    <label class="control-label col-md-3 ">
<!--                        包含商品：-->
                    </label>
                    <div class="col-md-6 " style="margin-top: 10px;">
                        <table width="100%" border="1" style="font-family: '微软雅黑';">
                            <tr align="center" style="font-size: 16px;">
                                <td>商品ID</td>
                                <td>商品图片</td>
                                <td>商品名称</td>
<!--                                <td>商品规格</td>-->
                                <td>商品价格</td>
                                <td>购买数量</td>
                                <td>商品支数</td>
                            </tr>
                            {volist name="$vo2.goods_list" id="vo3"}
                            <tr>
                                <td>{$vo3.goods_id}</td>
                                <td><img src="{$vo3.single_pic}" /> </td>
                                <td>{:StrLength($vo3.title,20)}</td>
                                <td>{$vo3.price}</td>
                                <td>{$vo3.number}</td>
                                <td>{$vo3.number2}</td>
                            </tr>
                            {/volist}
                        </table>
                    </div>
                </div>
                {/volist}
                <style>
                    .style{ text-align: center;}
                    .style img{ margin: 5px; width: 30px;height: 30px;}
                    .text{ margin-top: 8px;}
                </style>
                <div class="ln_solid"></div>
                <div class="form-group">
                    <div class="col-md-6 col-md-offset-3">
                        {eq name="$info.status" value="2"}
                        <button type="submit" class="btn btn-success">确认发货</button>{else/}
                        {/eq}
                        {eq name="$info.status" value="3"}
                        <button type="submit" class="btn btn-success">修改快递</button>{else/}
                        {/eq}
<!--                        {eq name="$info.status" value="4"}-->
<!--                        <button type="submit" class="btn btn-success">确认自提</button>-->
<!--                        {/eq}-->
                        {if in_array($info.status,[8])}
                        <button type="submit" class="btn btn-success">确认退款</button>
                        {/if}
                        {if in_array($info.status,[11])}
                        <button type="submit" class="btn btn-success">确认退货</button>
                        {/if}
                        <div class="btn btn-primary" onclick="history.go(-1)">返回</div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    function copyText(text) {
        var input = document.createElement('input');
        input.setAttribute('readonly', 'readonly');
        input.setAttribute('value', text);
        document.body.appendChild(input);
        input.setSelectionRange(0, 9999);
        input.select();
        if (document.execCommand('copy')) {
            document.execCommand('copy');
            layer.msg('复制成功')
        }
        document.body.removeChild(input);
    }

    $("form").validate({
        rules: {
            code: "required",
            email: {
                required: true,
                email: true
            },
            password: {
                required: true,
                minlength: 5
            },
            confirm_password: {
                required: true,
                minlength: 5,
                equalTo: "#password"
            }
        },
        messages: {
            code: "请输入姓名",
            code: {
                required: "请输入Email地址",
                code: "请输入正确的email地址"
            },
            password: {
                required: "请输入密码",
                minlength: jQuery.format("密码不能小于{0}个字符")
            },
            confirm_password: {
                required: "请输入确认密码",
                minlength: "确认密码不能小于5个字符",
                equalTo: "两次输入密码不一致不一致"
            }
        }
    });
</script>
